﻿using Super_Management_Mayhem.Content.Spritesheet;
using Transformable_Engine_v2.Engine.Animation.RotationAnimation;
using Transformable_Engine_v2.Engine.Animation.Trajectory;
using Transformable_Engine_v2.Engine.GameObjects.Containers;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Super_Management_Mayhem.Screens.Playing.Players.Hud
{
    public class TimeUp : Container
    {
        public override void LoadContent()
        {
            AddChildren(new ImageContainer
                            {
                                PositionGridBound = new TE_Vector2(-11, 0),
                                Sprite = UISheet.GetSprite(UISheet.TimeUp.Bubble),
                                Origin = TE_Rectangle.Alignment.CenterMiddle
                            });

            var hourglass = new ImageContainer
                                {
                                    PositionGridBound = new TE_Vector2(-11, 0),
                                    Sprite = UISheet.GetSprite(UISheet.Hud.Hourglass),
                                    Origin = TE_Rectangle.Alignment.CenterMiddle,
                                    Scale = new TE_Vector2(4, 4),
                                    Rotation = 0.015
                                };
            hourglass.AddAnimations(new RotationAnimation(new SinusTrajectory(), 0, 250, true, 0));
            AddChildren(hourglass);

            AddChildren(new ImageContainer
                            {
                                PositionGridBound = new TE_Vector2(-7, 0),
                                Sprite = UISheet.GetSprite(UISheet.TimeUp.Title),
                                Origin = TE_Rectangle.Alignment.CenterLeft
                            });

            base.LoadContent();
        }
    }
}